<nav id="sidebar" role="navigation" class="navbar-default navbar-static-side">
  <div class="sidebar-collapse menu-scroll">
    <ul id="side-menu" class="nav">
      <li class="user-panel">
       <!--  <div class="thumb"><img src="{:U('User/getImg')}" alt="" title="点此更换头像" class="img-circle"/></div> -->
        <div class="thumb"><img src="{$Think.session.pic}" alt="" title="{:L('UPDATE_FACE')}" class="img-circle"/></div>
        <div class="info"><p>{$Think.session.name} &nbsp; <if condition="$Think.session.exten gt 0">( {$Think.session.exten} )</if></p>
          <ul class="list-inline list-unstyled">
            <li><a href="javascript:edit_myself()" data-hover="tooltip" title="{:L('INFORMATION')}"><i class="fa fa-user"></i></a></li>
           <li><a href="__APP__?m=user&a=logout" data-hover="tooltip" title="{:L('EXIT')}"><i class="fa fa-sign-out"></i></a></li>
          </ul>
        </div>
        <div class="clearfix"></div>
      </li>
    <!--一级菜单开始-->
    <volist name="menu1" id="vo">
    <if condition="$vo.have_sun neq 1">
      <li class="one-level" id="menu_{$vo.action_code}"><a href="javascript:loadPage('{$vo.action_name}','{$vo.url}','{$vo.target}')" ><i class="fa {$vo.img}"><div class="icon-bg bg-orange"></div></i><span class="menu-title">{$vo.action_name}</span></a></li>
    <else/>
      <li class="two-level" id="menu_{$vo.action_code}" ><a href="javascript:loadPage('{$vo.action_name}','{$vo.url}','{$vo.target}')"><i class="fa {$vo.img}"><div class="icon-bg bg-orange"></div></i><span class="menu-title">{$vo.action_name}</span><span class="fa arrow"></span></a>
      <!--二级菜单开始-->
      <ul class="nav nav-second-level">
        <volist name="vo.sun" id="v2">
          <li class="lists-options" id="menu_{$v2.action_code}"><a href="javascript:loadPage('{$v2.action_name}','{$v2.url}','{$vo.target}')"><i class="fa {$v2.img}"></i><span class="submenu-title">{$v2.action_name}</span></a></li>
        </volist>
      </ul>
    <!--一级菜单结束-->
      </li>
    </if>
    </volist>	
    <!--一级菜单结束--> 
    </ul>                
  </div>
</nav>


<script type="text/javascript">

$(function(){
  $(".thumb").click(function(){
    parent.layer.open({
      type: 2,//iframe打开
      shadeClose: true,
      shade: 0.6,
      area: ['700px', '383px'], //宽高
      title: '{:L('UPDATE_FACE')}',
      content: '{:U("user/userimg")}&t=' + Math.random(1000), //iframe的url
      end: function(index){ 
        window.location.reload();
      }
    })
  });

  $(".lists-options").each(function(index){
    $(this).click(function(){
      $(".lists-options").children().removeClass('text-primary');
      $(".lists-options").eq(index).children().addClass('text-primary');
    })
  });

  $(".one-level").click(function(){
     $(".lists-options").children().removeClass('text-primary');
     $(".one-level.active").removeClass('active');
     $(".two-level.active").removeClass('active').children('ul').collapse('hide');
	   $(this).addClass('active');
  });
   

})
</script>
       
